package com.kx.springmvc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.Date;

/**
 * @ClassName User
 * @Author Sun
 * @Date 2021/5/20 18:45
 */
//NON_NULL设置返回的结果中只包含非 null 的数据,但是"" 会照常返回,NON_EMPTY ""也不会返回
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class User {
    private String name;
    @JsonIgnore
    private String password;
    private String address;
    private Integer age;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date birthday;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

}
